﻿import QtQuick 2.12
import QtQuick.Window 2.12
import QtQuick.Layouts 1.1
import QtQuick.Controls.Styles 1.2
import QtQuick.Controls 2.12
import QtMultimedia 5.14

CustomPopupBox {
    title: "高级配置"
    width: 400*dp
    height: 260*dp
    property int onbz: -1
    property var bzlist: []
    onVisibleChanged: {
        bzl.model=bzlist
        bzl.setIndex(onbz)
    }

    CustomComboBox{
        id:bzl
        x:10*dp
        y:20*dp
        width: parent.width-40*dp
        title: "开始步骤"
        model: bzlist
        titleWidth: 80*dp
        editWidth: 280*dp
        showClearButton: true
        onIndexChanged: {

        }
    }
    Text {
        x:90*dp
        y:65*dp
        width: parent.width-90*dp
        text: qsTr("注：若设置，该实验运行时将从设置的步骤开始实验")
        wrapMode: Text.WordWrap
    }
    CustomButton{
        y:parent.height-50*dp
        x:parent.width/2-125*dp
        width: 120*dp
        defaultMode2: true
        title: "取消"
        onReleased: {
            close()
        }
    }
    CustomButton{
        y:parent.height-50*dp
        x:parent.width/2+5*dp
        width: 120*dp
        defaultMode1: true
        title: "确定"
        onReleased: {
            if(bzl.getText()===""){
                bzonnum=-1
            }
            bzonnum = bzl.index+1
            close()
        }
    }
}
